package com.example.abc.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Date;

/**
 * Created by Peter on 2018/4/23.
 */
@Controller
public class WelcomeController {

    @RequestMapping(value = "/welcome", method = {RequestMethod.POST,RequestMethod.GET})
    public String welcome(Model model) {
        model.addAttribute("time",new Date());
        return "welcome";
    }
}
